\(\int \sec ^4(c+d x) \sqrt {a+a \sec (c+d x)} (A+B \sec (c+d x)) \, dx\) [118]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 33, antiderivative size = 187 \[ \int \sec ^4(c+d x) \sqrt {a+a \sec (c+d x)} (A+B \sec (c+d x)) \, dx=\frac {4 a (9 A+8 B) \tan (c+d x)}{45 d \sqrt {a+a \sec (c+d x)}}+\frac {2 a (9 A+8 B) \sec ^3(c+d x) \tan (c+d x)}{63 d \sqrt {a+a \sec (c+d x)}}+\frac {2 a B \sec ^4(c+d x) \tan (c+d x)}{9 d \sqrt {a+a \sec (c+d x)}}-\frac {8 (9 A+8 B) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{315 d}+\frac {4 (9 A+8 B) (a+a \sec (c+d x))^{3/2} \tan (c+d x)}{105 a d} \]

[Out]

4/105*(9*A+8*B)*(a+a*sec(d*x+c))^(3/2)*tan(d*x+c)/a/d+4/45*a*(9*A+8*B)*tan(d*x+c)/d/(a+a*sec(d*x+c))^(1/2)+2/6
3*a*(9*A+8*B)*sec(d*x+c)^3*tan(d*x+c)/d/(a+a*sec(d*x+c))^(1/2)+2/9*a*B*sec(d*x+c)^4*tan(d*x+c)/d/(a+a*sec(d*x+
c))^(1/2)-8/315*(9*A+8*B)*(a+a*sec(d*x+c))^(1/2)*tan(d*x+c)/d

Rubi [A] (verified)

Time = 0.42 (sec) , antiderivative size = 187, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.152, Rules used = {4101, 3888, 3885, 4086, 3877} \[ \int \sec ^4(c+d x) \sqrt {a+a \sec (c+d x)} (A+B \sec (c+d x)) \, dx=\frac {2 a (9 A+8 B) \tan (c+d x) \sec ^3(c+d x)}{63 d \sqrt {a \sec (c+d x)+a}}+\frac {4 (9 A+8 B) \tan (c+d x) (a \sec (c+d x)+a)^{3/2}}{105 a d}-\frac {8 (9 A+8 B) \tan (c+d x) \sqrt {a \sec (c+d x)+a}}{315 d}+\frac {4 a (9 A+8 B) \tan (c+d x)}{45 d \sqrt {a \sec (c+d x)+a}}+\frac {2 a B \tan (c+d x) \sec ^4(c+d x)}{9 d \sqrt {a \sec (c+d x)+a}} \]

[In]

Int[Sec[c + d*x]^4*Sqrt[a + a*Sec[c + d*x]]*(A + B*Sec[c + d*x]),x]

[Out]

(4*a*(9*A + 8*B)*Tan[c + d*x])/(45*d*Sqrt[a + a*Sec[c + d*x]]) + (2*a*(9*A + 8*B)*Sec[c + d*x]^3*Tan[c + d*x])
/(63*d*Sqrt[a + a*Sec[c + d*x]]) + (2*a*B*Sec[c + d*x]^4*Tan[c + d*x])/(9*d*Sqrt[a + a*Sec[c + d*x]]) - (8*(9*
A + 8*B)*Sqrt[a + a*Sec[c + d*x]]*Tan[c + d*x])/(315*d) + (4*(9*A + 8*B)*(a + a*Sec[c + d*x])^(3/2)*Tan[c + d*
x])/(105*a*d)

Rule 3877

Int[csc[(e_.) + (f_.)*(x_)]*Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Simp[-2*b*(Cot[e + f*x]/(
f*Sqrt[a + b*Csc[e + f*x]])), x] /; FreeQ[{a, b, e, f}, x] && EqQ[a^2 - b^2, 0]

Rule 3885

Int[csc[(e_.) + (f_.)*(x_)]^3*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Simp[(-Cot[e + f*x])*(
(a + b*Csc[e + f*x])^(m + 1)/(b*f*(m + 2))), x] + Dist[1/(b*(m + 2)), Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^m*
(b*(m + 1) - a*Csc[e + f*x]), x], x] /; FreeQ[{a, b, e, f, m}, x] && EqQ[a^2 - b^2, 0] &&  !LtQ[m, -2^(-1)]

Rule 3888

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Simp[-2*b*d*
Cot[e + f*x]*((d*Csc[e + f*x])^(n - 1)/(f*(2*n - 1)*Sqrt[a + b*Csc[e + f*x]])), x] + Dist[2*a*d*((n - 1)/(b*(2
*n - 1))), Int[Sqrt[a + b*Csc[e + f*x]]*(d*Csc[e + f*x])^(n - 1), x], x] /; FreeQ[{a, b, d, e, f}, x] && EqQ[a
^2 - b^2, 0] && GtQ[n, 1] && IntegerQ[2*n]

Rule 4086

Int[csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_))
, x_Symbol] :> Simp[(-B)*Cot[e + f*x]*((a + b*Csc[e + f*x])^m/(f*(m + 1))), x] + Dist[(a*B*m + A*b*(m + 1))/(b
*(m + 1)), Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^m, x], x] /; FreeQ[{a, b, A, B, e, f, m}, x] && NeQ[A*b - a*B
, 0] && EqQ[a^2 - b^2, 0] && NeQ[a*B*m + A*b*(m + 1), 0] &&  !LtQ[m, -2^(-1)]

Rule 4101

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)]*(csc[(e_.) + (f_.)*(x_)]*(
B_.) + (A_)), x_Symbol] :> Simp[-2*b*B*Cot[e + f*x]*((d*Csc[e + f*x])^n/(f*(2*n + 1)*Sqrt[a + b*Csc[e + f*x]])
), x] + Dist[(A*b*(2*n + 1) + 2*a*B*n)/(b*(2*n + 1)), Int[Sqrt[a + b*Csc[e + f*x]]*(d*Csc[e + f*x])^n, x], x]
/; FreeQ[{a, b, d, e, f, A, B, n}, x] && NeQ[A*b - a*B, 0] && EqQ[a^2 - b^2, 0] && NeQ[A*b*(2*n + 1) + 2*a*B*n
, 0] &&  !LtQ[n, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {2 a B \sec ^4(c+d x) \tan (c+d x)}{9 d \sqrt {a+a \sec (c+d x)}}+\frac {1}{9} (9 A+8 B) \int \sec ^4(c+d x) \sqrt {a+a \sec (c+d x)} \, dx \\ & = \frac {2 a (9 A+8 B) \sec ^3(c+d x) \tan (c+d x)}{63 d \sqrt {a+a \sec (c+d x)}}+\frac {2 a B \sec ^4(c+d x) \tan (c+d x)}{9 d \sqrt {a+a \sec (c+d x)}}+\frac {1}{21} (2 (9 A+8 B)) \int \sec ^3(c+d x) \sqrt {a+a \sec (c+d x)} \, dx \\ & = \frac {2 a (9 A+8 B) \sec ^3(c+d x) \tan (c+d x)}{63 d \sqrt {a+a \sec (c+d x)}}+\frac {2 a B \sec ^4(c+d x) \tan (c+d x)}{9 d \sqrt {a+a \sec (c+d x)}}+\frac {4 (9 A+8 B) (a+a \sec (c+d x))^{3/2} \tan (c+d x)}{105 a d}+\frac {(4 (9 A+8 B)) \int \sec (c+d x) \left (\frac {3 a}{2}-a \sec (c+d x)\right ) \sqrt {a+a \sec (c+d x)} \, dx}{105 a} \\ & = \frac {2 a (9 A+8 B) \sec ^3(c+d x) \tan (c+d x)}{63 d \sqrt {a+a \sec (c+d x)}}+\frac {2 a B \sec ^4(c+d x) \tan (c+d x)}{9 d \sqrt {a+a \sec (c+d x)}}-\frac {8 (9 A+8 B) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{315 d}+\frac {4 (9 A+8 B) (a+a \sec (c+d x))^{3/2} \tan (c+d x)}{105 a d}+\frac {1}{45} (2 (9 A+8 B)) \int \sec (c+d x) \sqrt {a+a \sec (c+d x)} \, dx \\ & = \frac {4 a (9 A+8 B) \tan (c+d x)}{45 d \sqrt {a+a \sec (c+d x)}}+\frac {2 a (9 A+8 B) \sec ^3(c+d x) \tan (c+d x)}{63 d \sqrt {a+a \sec (c+d x)}}+\frac {2 a B \sec ^4(c+d x) \tan (c+d x)}{9 d \sqrt {a+a \sec (c+d x)}}-\frac {8 (9 A+8 B) \sqrt {a+a \sec (c+d x)} \tan (c+d x)}{315 d}+\frac {4 (9 A+8 B) (a+a \sec (c+d x))^{3/2} \tan (c+d x)}{105 a d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.41 (sec) , antiderivative size = 98, normalized size of antiderivative = 0.52 \[ \int \sec ^4(c+d x) \sqrt {a+a \sec (c+d x)} (A+B \sec (c+d x)) \, dx=\frac {2 a \left (16 (9 A+8 B)+8 (9 A+8 B) \sec (c+d x)+6 (9 A+8 B) \sec ^2(c+d x)+5 (9 A+8 B) \sec ^3(c+d x)+35 B \sec ^4(c+d x)\right ) \tan (c+d x)}{315 d \sqrt {a (1+\sec (c+d x))}} \]

[In]

Integrate[Sec[c + d*x]^4*Sqrt[a + a*Sec[c + d*x]]*(A + B*Sec[c + d*x]),x]

[Out]

(2*a*(16*(9*A + 8*B) + 8*(9*A + 8*B)*Sec[c + d*x] + 6*(9*A + 8*B)*Sec[c + d*x]^2 + 5*(9*A + 8*B)*Sec[c + d*x]^
3 + 35*B*Sec[c + d*x]^4)*Tan[c + d*x])/(315*d*Sqrt[a*(1 + Sec[c + d*x])])

Maple [A] (verified)

Time = 4.40 (sec) , antiderivative size = 130, normalized size of antiderivative = 0.70

method result size
default \(\frac {2 \left (144 A \cos \left (d x +c \right )^{4}+128 B \cos \left (d x +c \right )^{4}+72 A \cos \left (d x +c \right )^{3}+64 B \cos \left (d x +c \right )^{3}+54 A \cos \left (d x +c \right )^{2}+48 B \cos \left (d x +c \right )^{2}+45 A \cos \left (d x +c \right )+40 B \cos \left (d x +c \right )+35 B \right ) \sqrt {a \left (1+\sec \left (d x +c \right )\right )}\, \tan \left (d x +c \right ) \sec \left (d x +c \right )^{3}}{315 d \left (\cos \left (d x +c \right )+1\right )}\) \(130\)
parts \(\frac {2 A \left (16 \cos \left (d x +c \right )^{3}+8 \cos \left (d x +c \right )^{2}+6 \cos \left (d x +c \right )+5\right ) \sqrt {a \left (1+\sec \left (d x +c \right )\right )}\, \tan \left (d x +c \right ) \sec \left (d x +c \right )^{2}}{35 d \left (\cos \left (d x +c \right )+1\right )}+\frac {2 B \left (128 \cos \left (d x +c \right )^{4}+64 \cos \left (d x +c \right )^{3}+48 \cos \left (d x +c \right )^{2}+40 \cos \left (d x +c \right )+35\right ) \sqrt {a \left (1+\sec \left (d x +c \right )\right )}\, \tan \left (d x +c \right ) \sec \left (d x +c \right )^{3}}{315 d \left (\cos \left (d x +c \right )+1\right )}\) \(156\)

[In]

int(sec(d*x+c)^4*(a+a*sec(d*x+c))^(1/2)*(A+B*sec(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

2/315/d*(144*A*cos(d*x+c)^4+128*B*cos(d*x+c)^4+72*A*cos(d*x+c)^3+64*B*cos(d*x+c)^3+54*A*cos(d*x+c)^2+48*B*cos(
d*x+c)^2+45*A*cos(d*x+c)+40*B*cos(d*x+c)+35*B)*(a*(1+sec(d*x+c)))^(1/2)/(cos(d*x+c)+1)*tan(d*x+c)*sec(d*x+c)^3

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 122, normalized size of antiderivative = 0.65 \[ \int \sec ^4(c+d x) \sqrt {a+a \sec (c+d x)} (A+B \sec (c+d x)) \, dx=\frac {2 \, {\left (16 \, {\left (9 \, A + 8 \, B\right )} \cos \left (d x + c\right )^{4} + 8 \, {\left (9 \, A + 8 \, B\right )} \cos \left (d x + c\right )^{3} + 6 \, {\left (9 \, A + 8 \, B\right )} \cos \left (d x + c\right )^{2} + 5 \, {\left (9 \, A + 8 \, B\right )} \cos \left (d x + c\right ) + 35 \, B\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{315 \, {\left (d \cos \left (d x + c\right )^{5} + d \cos \left (d x + c\right )^{4}\right )}} \]

[In]

integrate(sec(d*x+c)^4*(a+a*sec(d*x+c))^(1/2)*(A+B*sec(d*x+c)),x, algorithm="fricas")

[Out]

2/315*(16*(9*A + 8*B)*cos(d*x + c)^4 + 8*(9*A + 8*B)*cos(d*x + c)^3 + 6*(9*A + 8*B)*cos(d*x + c)^2 + 5*(9*A +
8*B)*cos(d*x + c) + 35*B)*sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*sin(d*x + c)/(d*cos(d*x + c)^5 + d*cos(d*x +
 c)^4)

Sympy [F]

\[ \int \sec ^4(c+d x) \sqrt {a+a \sec (c+d x)} (A+B \sec (c+d x)) \, dx=\int \sqrt {a \left (\sec {\left (c + d x \right )} + 1\right )} \left (A + B \sec {\left (c + d x \right )}\right ) \sec ^{4}{\left (c + d x \right )}\, dx \]

[In]

integrate(sec(d*x+c)**4*(a+a*sec(d*x+c))**(1/2)*(A+B*sec(d*x+c)),x)

[Out]

Integral(sqrt(a*(sec(c + d*x) + 1))*(A + B*sec(c + d*x))*sec(c + d*x)**4, x)

Maxima [F]

\[ \int \sec ^4(c+d x) \sqrt {a+a \sec (c+d x)} (A+B \sec (c+d x)) \, dx=\int { {\left (B \sec \left (d x + c\right ) + A\right )} \sqrt {a \sec \left (d x + c\right ) + a} \sec \left (d x + c\right )^{4} \,d x } \]

[In]

integrate(sec(d*x+c)^4*(a+a*sec(d*x+c))^(1/2)*(A+B*sec(d*x+c)),x, algorithm="maxima")

[Out]

16/315*(315*(cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*((A*d*cos(2*d*x + 2*c)^4
+ A*d*sin(2*d*x + 2*c)^4 + 4*A*d*cos(2*d*x + 2*c)^3 + 6*A*d*cos(2*d*x + 2*c)^2 + 4*A*d*cos(2*d*x + 2*c) + 2*(A
*d*cos(2*d*x + 2*c)^2 + 2*A*d*cos(2*d*x + 2*c) + A*d)*sin(2*d*x + 2*c)^2 + A*d)*integrate((((cos(12*d*x + 12*c
)*cos(2*d*x + 2*c) + 5*cos(10*d*x + 10*c)*cos(2*d*x + 2*c) + 10*cos(8*d*x + 8*c)*cos(2*d*x + 2*c) + 10*cos(6*d
*x + 6*c)*cos(2*d*x + 2*c) + 5*cos(4*d*x + 4*c)*cos(2*d*x + 2*c) + cos(2*d*x + 2*c)^2 + sin(12*d*x + 12*c)*sin
(2*d*x + 2*c) + 5*sin(10*d*x + 10*c)*sin(2*d*x + 2*c) + 10*sin(8*d*x + 8*c)*sin(2*d*x + 2*c) + 10*sin(6*d*x +
6*c)*sin(2*d*x + 2*c) + 5*sin(4*d*x + 4*c)*sin(2*d*x + 2*c) + sin(2*d*x + 2*c)^2)*cos(7/2*arctan2(sin(2*d*x +
2*c), cos(2*d*x + 2*c))) + (cos(2*d*x + 2*c)*sin(12*d*x + 12*c) + 5*cos(2*d*x + 2*c)*sin(10*d*x + 10*c) + 10*c
os(2*d*x + 2*c)*sin(8*d*x + 8*c) + 10*cos(2*d*x + 2*c)*sin(6*d*x + 6*c) + 5*cos(2*d*x + 2*c)*sin(4*d*x + 4*c)
- cos(12*d*x + 12*c)*sin(2*d*x + 2*c) - 5*cos(10*d*x + 10*c)*sin(2*d*x + 2*c) - 10*cos(8*d*x + 8*c)*sin(2*d*x
+ 2*c) - 10*cos(6*d*x + 6*c)*sin(2*d*x + 2*c) - 5*cos(4*d*x + 4*c)*sin(2*d*x + 2*c))*sin(7/2*arctan2(sin(2*d*x
 + 2*c), cos(2*d*x + 2*c))))*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)) - ((cos(2*d*x + 2*c)*sin
(12*d*x + 12*c) + 5*cos(2*d*x + 2*c)*sin(10*d*x + 10*c) + 10*cos(2*d*x + 2*c)*sin(8*d*x + 8*c) + 10*cos(2*d*x
+ 2*c)*sin(6*d*x + 6*c) + 5*cos(2*d*x + 2*c)*sin(4*d*x + 4*c) - cos(12*d*x + 12*c)*sin(2*d*x + 2*c) - 5*cos(10
*d*x + 10*c)*sin(2*d*x + 2*c) - 10*cos(8*d*x + 8*c)*sin(2*d*x + 2*c) - 10*cos(6*d*x + 6*c)*sin(2*d*x + 2*c) -
5*cos(4*d*x + 4*c)*sin(2*d*x + 2*c))*cos(7/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c))) - (cos(12*d*x + 12*c
)*cos(2*d*x + 2*c) + 5*cos(10*d*x + 10*c)*cos(2*d*x + 2*c) + 10*cos(8*d*x + 8*c)*cos(2*d*x + 2*c) + 10*cos(6*d
*x + 6*c)*cos(2*d*x + 2*c) + 5*cos(4*d*x + 4*c)*cos(2*d*x + 2*c) + cos(2*d*x + 2*c)^2 + sin(12*d*x + 12*c)*sin
(2*d*x + 2*c) + 5*sin(10*d*x + 10*c)*sin(2*d*x + 2*c) + 10*sin(8*d*x + 8*c)*sin(2*d*x + 2*c) + 10*sin(6*d*x +
6*c)*sin(2*d*x + 2*c) + 5*sin(4*d*x + 4*c)*sin(2*d*x + 2*c) + sin(2*d*x + 2*c)^2)*sin(7/2*arctan2(sin(2*d*x +
2*c), cos(2*d*x + 2*c))))*sin(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)))/(((2*(5*cos(10*d*x + 10*c)
 + 10*cos(8*d*x + 8*c) + 10*cos(6*d*x + 6*c) + 5*cos(4*d*x + 4*c) + cos(2*d*x + 2*c))*cos(12*d*x + 12*c) + cos
(12*d*x + 12*c)^2 + 10*(10*cos(8*d*x + 8*c) + 10*cos(6*d*x + 6*c) + 5*cos(4*d*x + 4*c) + cos(2*d*x + 2*c))*cos
(10*d*x + 10*c) + 25*cos(10*d*x + 10*c)^2 + 20*(10*cos(6*d*x + 6*c) + 5*cos(4*d*x + 4*c) + cos(2*d*x + 2*c))*c
os(8*d*x + 8*c) + 100*cos(8*d*x + 8*c)^2 + 20*(5*cos(4*d*x + 4*c) + cos(2*d*x + 2*c))*cos(6*d*x + 6*c) + 100*c
os(6*d*x + 6*c)^2 + 25*cos(4*d*x + 4*c)^2 + 10*cos(4*d*x + 4*c)*cos(2*d*x + 2*c) + cos(2*d*x + 2*c)^2 + 2*(5*s
in(10*d*x + 10*c) + 10*sin(8*d*x + 8*c) + 10*sin(6*d*x + 6*c) + 5*sin(4*d*x + 4*c) + sin(2*d*x + 2*c))*sin(12*
d*x + 12*c) + sin(12*d*x + 12*c)^2 + 10*(10*sin(8*d*x + 8*c) + 10*sin(6*d*x + 6*c) + 5*sin(4*d*x + 4*c) + sin(
2*d*x + 2*c))*sin(10*d*x + 10*c) + 25*sin(10*d*x + 10*c)^2 + 20*(10*sin(6*d*x + 6*c) + 5*sin(4*d*x + 4*c) + si
n(2*d*x + 2*c))*sin(8*d*x + 8*c) + 100*sin(8*d*x + 8*c)^2 + 20*(5*sin(4*d*x + 4*c) + sin(2*d*x + 2*c))*sin(6*d
*x + 6*c) + 100*sin(6*d*x + 6*c)^2 + 25*sin(4*d*x + 4*c)^2 + 10*sin(4*d*x + 4*c)*sin(2*d*x + 2*c) + sin(2*d*x
+ 2*c)^2)*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1))^2 + (2*(5*cos(10*d*x + 10*c) + 10*cos(8*d*x
 + 8*c) + 10*cos(6*d*x + 6*c) + 5*cos(4*d*x + 4*c) + cos(2*d*x + 2*c))*cos(12*d*x + 12*c) + cos(12*d*x + 12*c)
^2 + 10*(10*cos(8*d*x + 8*c) + 10*cos(6*d*x + 6*c) + 5*cos(4*d*x + 4*c) + cos(2*d*x + 2*c))*cos(10*d*x + 10*c)
 + 25*cos(10*d*x + 10*c)^2 + 20*(10*cos(6*d*x + 6*c) + 5*cos(4*d*x + 4*c) + cos(2*d*x + 2*c))*cos(8*d*x + 8*c)
 + 100*cos(8*d*x + 8*c)^2 + 20*(5*cos(4*d*x + 4*c) + cos(2*d*x + 2*c))*cos(6*d*x + 6*c) + 100*cos(6*d*x + 6*c)
^2 + 25*cos(4*d*x + 4*c)^2 + 10*cos(4*d*x + 4*c)*cos(2*d*x + 2*c) + cos(2*d*x + 2*c)^2 + 2*(5*sin(10*d*x + 10*
c) + 10*sin(8*d*x + 8*c) + 10*sin(6*d*x + 6*c) + 5*sin(4*d*x + 4*c) + sin(2*d*x + 2*c))*sin(12*d*x + 12*c) + s
in(12*d*x + 12*c)^2 + 10*(10*sin(8*d*x + 8*c) + 10*sin(6*d*x + 6*c) + 5*sin(4*d*x + 4*c) + sin(2*d*x + 2*c))*s
in(10*d*x + 10*c) + 25*sin(10*d*x + 10*c)^2 + 20*(10*sin(6*d*x + 6*c) + 5*sin(4*d*x + 4*c) + sin(2*d*x + 2*c))
*sin(8*d*x + 8*c) + 100*sin(8*d*x + 8*c)^2 + 20*(5*sin(4*d*x + 4*c) + sin(2*d*x + 2*c))*sin(6*d*x + 6*c) + 100
*sin(6*d*x + 6*c)^2 + 25*sin(4*d*x + 4*c)^2 + 10*sin(4*d*x + 4*c)*sin(2*d*x + 2*c) + sin(2*d*x + 2*c)^2)*sin(1
/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1))^2)*(cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x
+ 2*c) + 1)^(1/4)), x) + ((A + 2*B)*d*cos(2*d*x + 2*c)^4 + (A + 2*B)*d*sin(2*d*x + 2*c)^4 + 4*(A + 2*B)*d*cos(
2*d*x + 2*c)^3 + 6*(A + 2*B)*d*cos(2*d*x + 2*c)^2 + 4*(A + 2*B)*d*cos(2*d*x + 2*c) + 2*((A + 2*B)*d*cos(2*d*x
+ 2*c)^2 + 2*(A + 2*B)*d*cos(2*d*x + 2*c) + (A + 2*B)*d)*sin(2*d*x + 2*c)^2 + (A + 2*B)*d)*integrate((((cos(12
*d*x + 12*c)*cos(2*d*x + 2*c) + 5*cos(10*d*x + 10*c)*cos(2*d*x + 2*c) + 10*cos(8*d*x + 8*c)*cos(2*d*x + 2*c) +
 10*cos(6*d*x + 6*c)*cos(2*d*x + 2*c) + 5*cos(4*d*x + 4*c)*cos(2*d*x + 2*c) + cos(2*d*x + 2*c)^2 + sin(12*d*x
+ 12*c)*sin(2*d*x + 2*c) + 5*sin(10*d*x + 10*c)*sin(2*d*x + 2*c) + 10*sin(8*d*x + 8*c)*sin(2*d*x + 2*c) + 10*s
in(6*d*x + 6*c)*sin(2*d*x + 2*c) + 5*sin(4*d*x + 4*c)*sin(2*d*x + 2*c) + sin(2*d*x + 2*c)^2)*cos(5/2*arctan2(s
in(2*d*x + 2*c), cos(2*d*x + 2*c))) + (cos(2*d*x + 2*c)*sin(12*d*x + 12*c) + 5*cos(2*d*x + 2*c)*sin(10*d*x + 1
0*c) + 10*cos(2*d*x + 2*c)*sin(8*d*x + 8*c) + 10*cos(2*d*x + 2*c)*sin(6*d*x + 6*c) + 5*cos(2*d*x + 2*c)*sin(4*
d*x + 4*c) - cos(12*d*x + 12*c)*sin(2*d*x + 2*c) - 5*cos(10*d*x + 10*c)*sin(2*d*x + 2*c) - 10*cos(8*d*x + 8*c)
*sin(2*d*x + 2*c) - 10*cos(6*d*x + 6*c)*sin(2*d*x + 2*c) - 5*cos(4*d*x + 4*c)*sin(2*d*x + 2*c))*sin(5/2*arctan
2(sin(2*d*x + 2*c), cos(2*d*x + 2*c))))*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)) - ((cos(2*d*x
 + 2*c)*sin(12*d*x + 12*c) + 5*cos(2*d*x + 2*c)*sin(10*d*x + 10*c) + 10*cos(2*d*x + 2*c)*sin(8*d*x + 8*c) + 10
*cos(2*d*x + 2*c)*sin(6*d*x + 6*c) + 5*cos(2*d*x + 2*c)*sin(4*d*x + 4*c) - cos(12*d*x + 12*c)*sin(2*d*x + 2*c)
 - 5*cos(10*d*x + 10*c)*sin(2*d*x + 2*c) - 10*cos(8*d*x + 8*c)*sin(2*d*x + 2*c) - 10*cos(6*d*x + 6*c)*sin(2*d*
x + 2*c) - 5*cos(4*d*x + 4*c)*sin(2*d*x + 2*c))*cos(5/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c))) - (cos(12
*d*x + 12*c)*cos(2*d*x + 2*c) + 5*cos(10*d*x + 10*c)*cos(2*d*x + 2*c) + 10*cos(8*d*x + 8*c)*cos(2*d*x + 2*c) +
 10*cos(6*d*x + 6*c)*cos(2*d*x + 2*c) + 5*cos(4*d*x + 4*c)*cos(2*d*x + 2*c) + cos(2*d*x + 2*c)^2 + sin(12*d*x
+ 12*c)*sin(2*d*x + 2*c) + 5*sin(10*d*x + 10*c)*sin(2*d*x + 2*c) + 10*sin(8*d*x + 8*c)*sin(2*d*x + 2*c) + 10*s
in(6*d*x + 6*c)*sin(2*d*x + 2*c) + 5*sin(4*d*x + 4*c)*sin(2*d*x + 2*c) + sin(2*d*x + 2*c)^2)*sin(5/2*arctan2(s
in(2*d*x + 2*c), cos(2*d*x + 2*c))))*sin(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)))/(((2*(5*cos(10*
d*x + 10*c) + 10*cos(8*d*x + 8*c) + 10*cos(6*d*x + 6*c) + 5*cos(4*d*x + 4*c) + cos(2*d*x + 2*c))*cos(12*d*x +
12*c) + cos(12*d*x + 12*c)^2 + 10*(10*cos(8*d*x + 8*c) + 10*cos(6*d*x + 6*c) + 5*cos(4*d*x + 4*c) + cos(2*d*x
+ 2*c))*cos(10*d*x + 10*c) + 25*cos(10*d*x + 10*c)^2 + 20*(10*cos(6*d*x + 6*c) + 5*cos(4*d*x + 4*c) + cos(2*d*
x + 2*c))*cos(8*d*x + 8*c) + 100*cos(8*d*x + 8*c)^2 + 20*(5*cos(4*d*x + 4*c) + cos(2*d*x + 2*c))*cos(6*d*x + 6
*c) + 100*cos(6*d*x + 6*c)^2 + 25*cos(4*d*x + 4*c)^2 + 10*cos(4*d*x + 4*c)*cos(2*d*x + 2*c) + cos(2*d*x + 2*c)
^2 + 2*(5*sin(10*d*x + 10*c) + 10*sin(8*d*x + 8*c) + 10*sin(6*d*x + 6*c) + 5*sin(4*d*x + 4*c) + sin(2*d*x + 2*
c))*sin(12*d*x + 12*c) + sin(12*d*x + 12*c)^2 + 10*(10*sin(8*d*x + 8*c) + 10*sin(6*d*x + 6*c) + 5*sin(4*d*x +
4*c) + sin(2*d*x + 2*c))*sin(10*d*x + 10*c) + 25*sin(10*d*x + 10*c)^2 + 20*(10*sin(6*d*x + 6*c) + 5*sin(4*d*x
+ 4*c) + sin(2*d*x + 2*c))*sin(8*d*x + 8*c) + 100*sin(8*d*x + 8*c)^2 + 20*(5*sin(4*d*x + 4*c) + sin(2*d*x + 2*
c))*sin(6*d*x + 6*c) + 100*sin(6*d*x + 6*c)^2 + 25*sin(4*d*x + 4*c)^2 + 10*sin(4*d*x + 4*c)*sin(2*d*x + 2*c) +
 sin(2*d*x + 2*c)^2)*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1))^2 + (2*(5*cos(10*d*x + 10*c) + 1
0*cos(8*d*x + 8*c) + 10*cos(6*d*x + 6*c) + 5*cos(4*d*x + 4*c) + cos(2*d*x + 2*c))*cos(12*d*x + 12*c) + cos(12*
d*x + 12*c)^2 + 10*(10*cos(8*d*x + 8*c) + 10*cos(6*d*x + 6*c) + 5*cos(4*d*x + 4*c) + cos(2*d*x + 2*c))*cos(10*
d*x + 10*c) + 25*cos(10*d*x + 10*c)^2 + 20*(10*cos(6*d*x + 6*c) + 5*cos(4*d*x + 4*c) + cos(2*d*x + 2*c))*cos(8
*d*x + 8*c) + 100*cos(8*d*x + 8*c)^2 + 20*(5*cos(4*d*x + 4*c) + cos(2*d*x + 2*c))*cos(6*d*x + 6*c) + 100*cos(6
*d*x + 6*c)^2 + 25*cos(4*d*x + 4*c)^2 + 10*cos(4*d*x + 4*c)*cos(2*d*x + 2*c) + cos(2*d*x + 2*c)^2 + 2*(5*sin(1
0*d*x + 10*c) + 10*sin(8*d*x + 8*c) + 10*sin(6*d*x + 6*c) + 5*sin(4*d*x + 4*c) + sin(2*d*x + 2*c))*sin(12*d*x
+ 12*c) + sin(12*d*x + 12*c)^2 + 10*(10*sin(8*d*x + 8*c) + 10*sin(6*d*x + 6*c) + 5*sin(4*d*x + 4*c) + sin(2*d*
x + 2*c))*sin(10*d*x + 10*c) + 25*sin(10*d*x + 10*c)^2 + 20*(10*sin(6*d*x + 6*c) + 5*sin(4*d*x + 4*c) + sin(2*
d*x + 2*c))*sin(8*d*x + 8*c) + 100*sin(8*d*x + 8*c)^2 + 20*(5*sin(4*d*x + 4*c) + sin(2*d*x + 2*c))*sin(6*d*x +
 6*c) + 100*sin(6*d*x + 6*c)^2 + 25*sin(4*d*x + 4*c)^2 + 10*sin(4*d*x + 4*c)*sin(2*d*x + 2*c) + sin(2*d*x + 2*
c)^2)*sin(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1))^2)*(cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2
*cos(2*d*x + 2*c) + 1)^(1/4)), x))*sqrt(a) - (9*(7*(A + 2*B)*sin(4*d*x + 4*c) + (9*A + 8*B)*sin(2*d*x + 2*c))*
cos(9/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)) - (63*(A + 2*B)*cos(4*d*x + 4*c) + 9*(9*A + 8*B)*cos(
2*d*x + 2*c) + 18*A + 16*B)*sin(9/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)))*sqrt(a))/((d*cos(2*d*x +
 2*c)^4 + d*sin(2*d*x + 2*c)^4 + 4*d*cos(2*d*x + 2*c)^3 + 6*d*cos(2*d*x + 2*c)^2 + 2*(d*cos(2*d*x + 2*c)^2 + 2
*d*cos(2*d*x + 2*c) + d)*sin(2*d*x + 2*c)^2 + 4*d*cos(2*d*x + 2*c) + d)*(cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)
^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4))

Giac [F]

\[ \int \sec ^4(c+d x) \sqrt {a+a \sec (c+d x)} (A+B \sec (c+d x)) \, dx=\int { {\left (B \sec \left (d x + c\right ) + A\right )} \sqrt {a \sec \left (d x + c\right ) + a} \sec \left (d x + c\right )^{4} \,d x } \]

[In]

integrate(sec(d*x+c)^4*(a+a*sec(d*x+c))^(1/2)*(A+B*sec(d*x+c)),x, algorithm="giac")

[Out]

sage0*x

Mupad [B] (verification not implemented)

Time = 22.63 (sec) , antiderivative size = 512, normalized size of antiderivative = 2.74 \[ \int \sec ^4(c+d x) \sqrt {a+a \sec (c+d x)} (A+B \sec (c+d x)) \, dx=\frac {\sqrt {a+\frac {a}{\frac {{\mathrm {e}}^{-c\,1{}\mathrm {i}-d\,x\,1{}\mathrm {i}}}{2}+\frac {{\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}}{2}}}\,\left ({\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}\,\left (\frac {A\,16{}\mathrm {i}}{5\,d}+\frac {\left (48\,A-32\,B\right )\,1{}\mathrm {i}}{105\,d}\right )+\frac {\left (336\,A+672\,B\right )\,1{}\mathrm {i}}{105\,d}\right )}{\left ({\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}+1\right )\,{\left ({\mathrm {e}}^{c\,2{}\mathrm {i}+d\,x\,2{}\mathrm {i}}+1\right )}^2}-\frac {\sqrt {a+\frac {a}{\frac {{\mathrm {e}}^{-c\,1{}\mathrm {i}-d\,x\,1{}\mathrm {i}}}{2}+\frac {{\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}}{2}}}\,\left ({\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}\,\left (\frac {A\,16{}\mathrm {i}}{7\,d}-\frac {B\,320{}\mathrm {i}}{63\,d}\right )+\frac {B\,32{}\mathrm {i}}{7\,d}+\frac {\left (144\,A+288\,B\right )\,1{}\mathrm {i}}{63\,d}\right )}{\left ({\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}+1\right )\,{\left ({\mathrm {e}}^{c\,2{}\mathrm {i}+d\,x\,2{}\mathrm {i}}+1\right )}^3}+\frac {\sqrt {a+\frac {a}{\frac {{\mathrm {e}}^{-c\,1{}\mathrm {i}-d\,x\,1{}\mathrm {i}}}{2}+\frac {{\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}}{2}}}\,\left (-\frac {A\,16{}\mathrm {i}}{9\,d}+{\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}\,\left (\frac {A\,16{}\mathrm {i}}{9\,d}-\frac {\left (16\,A+32\,B\right )\,1{}\mathrm {i}}{9\,d}\right )+\frac {\left (16\,A+32\,B\right )\,1{}\mathrm {i}}{9\,d}\right )}{\left ({\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}+1\right )\,{\left ({\mathrm {e}}^{c\,2{}\mathrm {i}+d\,x\,2{}\mathrm {i}}+1\right )}^4}-\frac {{\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}\,\sqrt {a+\frac {a}{\frac {{\mathrm {e}}^{-c\,1{}\mathrm {i}-d\,x\,1{}\mathrm {i}}}{2}+\frac {{\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}}{2}}}\,\left (288\,A+256\,B\right )\,1{}\mathrm {i}}{315\,d\,\left ({\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}+1\right )}-\frac {{\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}\,\sqrt {a+\frac {a}{\frac {{\mathrm {e}}^{-c\,1{}\mathrm {i}-d\,x\,1{}\mathrm {i}}}{2}+\frac {{\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}}{2}}}\,\left (144\,A+128\,B\right )\,1{}\mathrm {i}}{315\,d\,\left ({\mathrm {e}}^{c\,1{}\mathrm {i}+d\,x\,1{}\mathrm {i}}+1\right )\,\left ({\mathrm {e}}^{c\,2{}\mathrm {i}+d\,x\,2{}\mathrm {i}}+1\right )} \]

[In]

int(((A + B/cos(c + d*x))*(a + a/cos(c + d*x))^(1/2))/cos(c + d*x)^4,x)

[Out]

((a + a/(exp(- c*1i - d*x*1i)/2 + exp(c*1i + d*x*1i)/2))^(1/2)*(exp(c*1i + d*x*1i)*((A*16i)/(5*d) + ((48*A - 3
2*B)*1i)/(105*d)) + ((336*A + 672*B)*1i)/(105*d)))/((exp(c*1i + d*x*1i) + 1)*(exp(c*2i + d*x*2i) + 1)^2) - ((a
 + a/(exp(- c*1i - d*x*1i)/2 + exp(c*1i + d*x*1i)/2))^(1/2)*(exp(c*1i + d*x*1i)*((A*16i)/(7*d) - (B*320i)/(63*
d)) + (B*32i)/(7*d) + ((144*A + 288*B)*1i)/(63*d)))/((exp(c*1i + d*x*1i) + 1)*(exp(c*2i + d*x*2i) + 1)^3) + ((
a + a/(exp(- c*1i - d*x*1i)/2 + exp(c*1i + d*x*1i)/2))^(1/2)*(exp(c*1i + d*x*1i)*((A*16i)/(9*d) - ((16*A + 32*
B)*1i)/(9*d)) - (A*16i)/(9*d) + ((16*A + 32*B)*1i)/(9*d)))/((exp(c*1i + d*x*1i) + 1)*(exp(c*2i + d*x*2i) + 1)^
4) - (exp(c*1i + d*x*1i)*(a + a/(exp(- c*1i - d*x*1i)/2 + exp(c*1i + d*x*1i)/2))^(1/2)*(288*A + 256*B)*1i)/(31
5*d*(exp(c*1i + d*x*1i) + 1)) - (exp(c*1i + d*x*1i)*(a + a/(exp(- c*1i - d*x*1i)/2 + exp(c*1i + d*x*1i)/2))^(1
/2)*(144*A + 128*B)*1i)/(315*d*(exp(c*1i + d*x*1i) + 1)*(exp(c*2i + d*x*2i) + 1))